package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.entity.Business;
import java.util.List;

public interface IBusinessMapper extends BaseMapper<Business> {
    // 根据 businessId 查询商家信息
    @Select("SELECT * FROM business WHERE business_id = #{businessId}")
    Business getBusinessById(@Param("businessId") Integer businessId);

    // 根据 orderTypeId 查询商家列表
    @Select("SELECT * FROM business WHERE order_type_id = #{orderTypeId}")
    List<Business> listBusinessByOrderTypeId(@Param("orderTypeId") Integer orderTypeId);
} 